##These would work like this: China (AI only) has 1 desicion. Pressing it, it will use random_list to select a state to invest in
##the more frequent a country should be selected, the more states it would have there
##Big important countries with plenty money to invest like China and Japan should have own desicions
##then gradually they are more generic
##key is selecting big states where it's likely there is room for investment... one can use else command to shift to one with room
##The countries invested in should correspond with countries they can influence
##some work done on that here: 
## num_of_available_civilian_factories

#invest_cic = yes
#invest_infra = yes
# See state_names_l_english.yml or ingame for states to prioritize (optional)
	
investment_decisions = {

	ai_chi_foreign_investment = {
		
		icon = decision
		cost = 1
		visible = { is_ai = yes }
		
		allowed = { tag = CHI }
		available = { check_variable = { treasury > 70 } AND = { is_ai = yes } }
		
		ai_will_do = { factor = 4000 }
		fixed_random_seed = no
		
		days_remove = 5 #once a week
		days_re_enable = 0
		
		complete_effect = {

			random_list = {
			
				######################
				######## Asia ########
				######################
				
				### East Asia ###
				#Mongolia
				2 = {
					MON = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 597 596 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					MON = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 597 596 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				
				
				### Southeast Asia ###
				#Indonesia
				8 = { 
					IND = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 631 633 634 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					IND = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 631 633 634 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#Singapore
					8 = { 
					SIN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 530 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					SIN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 530 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#East Timor
					1 = { 
					TIM = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 734 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					TIM = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 734 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#Malaysia
				8 = { 
					MAY = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 527 528 529 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					MAY = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 527 528 529 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}

				#Myanmar
				8 = { 
					BRM = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 504 505 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					BRM = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 497 504 505 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Thailand
				10 = { 
					SIA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 508 506 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				5 = { 
					SIA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 508 506 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Cambodia
				4 = { 
					CBD = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 514 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					CBD = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 514 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Laos
				4 = { 
					LAO = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 515 516 517 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					LAO = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 515 516 517 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				### South Asia ###
				#Pakistan
				8 = { 
					PAK = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 418 422 563 573 426 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				4 = { 
					PAK = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 418 422 563 573 426 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Bangladesh
				8 = { 
					BAN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 490 492 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				4 = { 
					BAN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 490 492 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Nepal
				2 = { 
					NEP = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 485 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					NEP = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 485 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				###Central Asia###
				#Kazakhstan
				2 = { 
					KAZ = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 716 717 719 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					KAZ = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 716 717 719 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Kyrgyzstan
				2 = { 
					KYR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 720 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					KYR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 720 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Tajikistan
				2 = { 
					TAJ = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 722 723 724 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					TAJ = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 722 723 724 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Uzbekistan
				2 = { 
					UZB = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 725 726 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					UZB = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 725 726 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Turkmenistan
				2 = { 
					TRK = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 728 729 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					TRK = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 728 729 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				###Middle East North Africa###
				#Turkey
				4 = { 
					TUR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 159 155 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					TUR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 163 159 155 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Tunisia
				1 = { 
					TUN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 388 389 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					TUN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 388 389 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Algeria
				8 = { 
					ALG = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 386 387 385 384 380 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				4 = { 
					ALG = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 386 387 385 384 380 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Morocco
				1 = { 
					MOR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 377 374 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					MOR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 377 374 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Saudi Arabia
				8 = { 
					SAU = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 176 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				4 = { 
					SAU = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 176 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#Jordan
				2 = { 
					JOR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 210 212 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					JOR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 210 212 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#Oman
				2 = { 
					OMA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 182 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					OMA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 182 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#Egypt
				2 = { 
					EGY = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 214 215 216 217 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					EGY = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 214 215 216 217 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				
				
				#United Arab Emirates
				8 = { 
					UAE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 179 180 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				4 = { 
					UAE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 179 180 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				
				#Iran
				8 = { 
					PER = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 400 402 404 405 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				4 = { 
					PER = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 400 402 404 405 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				###Africa Sub-Sahara###
				#Tanzania
				4 = { 
					TNZ = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 255 257 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					TNZ = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 255 257 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Mozambique
				4 = { 
					MOZ = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 264 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					MOZ = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Malawi
				4 = { 
					MLW = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					MLW = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Zambia
				4 = { 
					ZAM = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					ZAM = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Angola
				8 = { 
					AGL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 298 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				4 = { 
					AGL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Democratic Republic of Congo
				4 = { 
					DRC = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 302 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					DRC = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Congo
				8 = { 
					CNG = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 315 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				4 = { 
					CNG = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Gabon
				4 = { 
					GAB = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 317 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					GAB = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 317 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Equatorial Guinea
				4 = { 
					EGU = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 318 319 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					EGU = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 318 319 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Cameroon
				4 = { 
					CAM = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					CAM = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Nigeria
				2 = { 
					NIG = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 332 334 336 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					NIG = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Benin
				4 = { 
					BEN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					BEN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Togo
				4 = { 
					TOG = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					TOG = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Ghana
				2 = { 
					GAH = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					GAH = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Cote D'ivore
				4 = { 
					CDI = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					CDI = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Liberia
				2 = { 
					LIB = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					LIB = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Guinea needs to be quoted
				4 = { 
					"GUI" = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					"GUI" = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Sierra Leone
				2 = { 
					SIE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					SIE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Guinea-Bissau
				4 = { 
					GUB = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					GUB = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Senegal
				2 = { 
					SEN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					SEN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Gambia
				4 = { 
					GAM = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					GAM = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Mauritiana
				4 = { 
					MAU = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					MAU = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Mali
				4 = { 
					MAL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					MAL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Burkina Faso
				4 = { 
					BFA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					BFA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Niger
				4 = { 
					NGR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					NGR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Madagascar
				4 = { 
					MAD = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					MAD = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Chad
				4 = { 
					CHA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					CHA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#Kenya
				2 = { 
					KEN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 242 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					KEN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Zimbawe
				8 = { 
					ZIM = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				4 = { 
					ZIM = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Botswana
				4 = { 
					BOT = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					BOT = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#South Africa
				8 = { 
					SAF = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				4 = { 
					SAF = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Ethiopia
				4 = { 
					ETH = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					ETH = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				###South America###
				#Brazil
				2 = { 
					BRA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					BRA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Argentina
				2 = { 
					ARG = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					ARG = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Uruguay
				2 = { 
					URG = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					URG = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Chile
				2 = { 
					CHL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					CHL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Paraguay
				2 = { 
					PAR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					PAR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Peru
				2 = { 
					PRU = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					PRU = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Bolivia
				4 = { 
					BOL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					BOL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Ecuador
				4 = { 
					ECU = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					ECU = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Colombia
				1 = { 
					COL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					COL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Venezuela
				4 = { 
					VEN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					VEN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Guyana
				2 = { 
					GUY = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					GUY = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Suriname
				2 = { 
					SUR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					SUR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				###Central America###
				#Panama needs to be quoted 
				2 = { 
					"PAN" = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					"PAN" = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Costa Rica
				2 = { 
					COS = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					COS = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Nicaragua
				4 = { 
					NIC = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					NIC = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Honduras
				2 = { 
					HON = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					HON = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#El Salvador
				2 = { 
					ELS = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					ELS = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Guatemala
				2 = { 
					GUA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					GUA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Belize
				2 = { 
					BLZ = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					BLZ = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				###Caribbean###
				#Cuba
				4 = { 
					CUB = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					CUB = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Haiti
				2 = { 
					HAI = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					HAI = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Dominican Republic
				2 = { 
					DOM = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					DOM = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Jamaica
				2 = { 
					JAM = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					JAM = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				###North America###
				#Mexico
				2 = { 
					MEX = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 233 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					MEX = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
			}
		}	
	}
	
	ai_jap_foreign_investment = {
		
		icon = decision
		cost = 1
		visible = { is_ai = yes }
		
		allowed = { tag = JAP }
		available = { check_variable = { treasury > 50 } AND = { is_ai = yes } }
		
		ai_will_do = { factor = 4000 }
		fixed_random_seed = no
		
		days_remove = 20 #once a month
		days_re_enable = 0
		
		complete_effect = {

			random_list = {
				######################
				######## Asia ########
				######################
				
				### East Asia ###
				#China
				4 = { 
					CHI = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				8 = { 
					CHI = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#South Korea
				2 = { 
					KOR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					KOR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Taiwan
				1 = { 
					TAI = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					TAI = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Singapore
				4 = { 
					SIN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				8 = { 
					SIN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Thailand
				4 = { 
					SIA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				8 = { 
					SIA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Indonesia
				1 = { 
					IND = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					IND = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Malaysia
				1 = { 
					MAY = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					MAY = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Philippines
				1 = { 
					"PHI" = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					"PHI" = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				###North America###
				#Canada
				2 = { 
					CAN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					CAN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#United States of America
				8 = { 
					USA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				16 = { 
					USA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Mexico
				1 = { 
					MEX = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					MEX = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				###South America###
				#Brazil
				8 = { 
					BRA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					BRA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				###Oceania###
				#Austrailia
				4 = { 
					AST = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					AST = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#New Zealand
				1 = { 
					NZL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					NZL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				###Europe###
				#Germany
				4 = { 
					GER = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				8 = { 
					GER = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#United Kingdom
				8 = { 
					ENG = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					ENG = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#France
				4 = { 
					FRA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					FRA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Netherlands
				1 = { 
					HOL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					HOL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Italy
				4 = { 
					ITA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					ITA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Belgium
				1 = { 
					BEL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					BEL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Luxemburg
				1 = { 
					LUX = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					LUX = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Switzerland
				4 = { 
					SWI = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					SWI = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Sweden
				4 = { 
					SWE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					SWE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Spain
				1 = { 
					SPR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					SPR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				###Africa###
				#South Africa
				4 = { 
					SAF = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					SAF = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				
			}
		
	}
}

	ai_kor_foreign_investment = {
		
		icon = decision
		cost = 1
		visible = { is_ai = yes }
		
		allowed = { tag = KOR }
		available = { check_variable = { treasury > 50 } AND = { is_ai = yes } }
		
		ai_will_do = { factor = 4000 }
		fixed_random_seed = no
		
		days_remove = 30 #once a month
		days_re_enable = 0
		
		complete_effect = {

			random_list = {
				######################
				######## Asia ########
				######################
				#China
				8 = { 
					CHI = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					CHI = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#Japan
				4 = { 
					JAP = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					JAP = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#India
				6 = { 
					RAJ = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				3 = { 
					RAJ = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#Indonesia
				4 = { 
					IND = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { 631 633 634 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					IND = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { 631 633 634 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#Kazakhstan
				2 = { 
					KAZ = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { 716 717 719 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					KAZ = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { 716 717 719 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#Malaysia
				4 = { 
					MAY = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { 527 528 529 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					MAY = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#Singapore
				4 = { 
					SIN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { 530 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					SIN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { 530 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#Philippines
				4 = { 
					"PHI" = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					"PHI" = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#Thailand
				8 = { 
					SIA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { 508 506 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					SIA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { 508 506 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#Vietnam
				4 = { 
					VIE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					VIE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				
				######################
				### North America ####
				######################
				#Canada
				4 = { 
					CAN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					CAN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Mexico
				4 = { 
					MEX = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					MEX = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#United States
				8 = { 
					USA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					USA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				
				######################
				#### South America ###
				######################
				#Brazil
				4 = { 
					BRA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					BRA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				
				
				######################
				####### Europe #######
				######################
				#Netherlands
				4 = { 
					HOL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					HOL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#France
				2 = { 
					FRA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					FRA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Germany
				2 = { 
					GER = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					GER = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Slovakia
				2 = { 
					SLO = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					SLO = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Spain
				4 = { 
					SPR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					SPR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#United Kingdom
				4 = { 
					ENG = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					ENG = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				
				######################
				####### Africa #######
				######################
				#Madagascar
				2 = { 
					MAD = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					MAD = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				
				
				######################
				###### Oceania #######
				######################
				#Australia
				4 = { 
					AST = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					AST = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 }  } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
			}
		}
}
	
	ai_usa_foreign_investment = {
		
		icon = decision
		cost = 1
		visible = { is_ai = yes }
		
		allowed = { tag = USA }
		available = { check_variable = { treasury > 50 } AND = { is_ai = yes } }
		
		ai_will_do = { factor = 4000 }
		fixed_random_seed = no
		
		days_remove = 7 #once a week
		days_re_enable = 0
		
		complete_effect = {

			random_list = {
				######################
				######## Asia ########
				######################
				#Japan	
				8 = { 
					JAP = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					JAP = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#South Korea
				8 = { 
					KOR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					KOR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#China
				16 = { 
					CHI = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				8 = { 
					CHI = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#India
				8 = { 
					RAJ = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					RAJ = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Indonesia
				4 = { 
					IND = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					IND = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Kazakhstan
				4 = { 
					KAZ = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					KAZ = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Malaysia
				4 = { 
					MAY = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					MAY = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Singapore
				4 = { 
					SIN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					SIN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Taiwan
				4 = { 
					TAI = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					TAI = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Thailand
				8 = { 
					SIA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					SIA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Philippines
				4 = { 
					"PHI" = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					"PHI" = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Pakistan
				4 = { 
					PAK = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					PAK = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				###Middle East###
				#Saudi Arabia
				8 = { 
					SAU = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					SAU = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Qatar
				4 = { 
					QAT = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					QAT = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#United Arab Emirates
				4 = { 
					UAE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					UAE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Israel
				8 = { 
					ISR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					ISR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Turkey
				4 = { 
					TUR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					TUR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Azerbaijan
				2 = { 
					AZE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					AZE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				
				
				
				######################
				####### Europa #######
				######################
				#Austria
				4 = { 
					AUS = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					AUS = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Belgium
				4 = { 
					BEL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					BEL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Czech Republic
				4 = { 
					CZE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					CZE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Denmark
				4 = { 
					DEN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					DEN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Finland
				4 = { 
					FIN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					FIN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#France
				8 = { 
					FRA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					FRA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Germany
				8 = { 
					GER = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					GER = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Greece
				4 = { 
					GRE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					GRE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Hungary
				4 = { 
					HUN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					HUN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Ireland
				8 = { 
					IRE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					IRE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Italy
				4 = { 
					ITA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					ITA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Luxembourg
				4 = { 
					LUX = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					LUX = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Netherlands
				4 = { 
					HOL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					HOL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Norway
				2 = { 
					NOR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					NOR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Poland
				2 = { 
					POL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					POL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Portugal
				2 = { 
					POR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					POR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Spain
				4 = { 
					SPR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					SPR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Sweden
				4 = { 
					SWE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					SWE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Switzerland
				4 = { 
					SWI = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					SWI = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#United Kingdom
				8 = { 
					ENG = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					ENG = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Russian Federation
				2 = { 
					SOV = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					SOV = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				######################
				#### South America ###
				######################
				#Chile
				4 = { 
					CHL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					CHL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Argentina
				4 = { 
					ARG = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					ARG = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Bolivia
				4 = { 
					BOL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					BOL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Brazil
				4 = { 
					BRA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					BRA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Colombia
				4 = { 
					COL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					COL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Ecuador
				4 = { 
					ECU = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					ECU = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Peru
				4 = { 
					PRU = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					PRU = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Venezuela
				4 = { 
					VEN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					VEN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				######################
				## Central America ###
				######################

				#Panama
				4 = { 
					"PAN" = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					"PAN" = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#El Salvador
				4 = { 
					ELS = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					ELS = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				######################
				#### North America ###
				######################
				#Canada
				8 = { 
					CAN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					CAN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Mexico
				8 = { 
					MEX = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					MEX = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				######################
				####### Africa #######
				######################
				#Algeria
				2 = { 
					ALG = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					ALG = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Egypt
				4 = { 
					EGY = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					EGY = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Libya
				2 = { 
					LBA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					LBA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Angola
				2 = { 
					AGL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					AGL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Equatorial Guinea
				2 = { 
					EGU = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					EGU = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Gabon
				2 = { 
					GAB = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					GAB = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#South Africa
				4 = { 
					SAF = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					SAF = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				
				######################
				###### Oceania #######
				######################
				#Australia
				4 = { 
					AST = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					AST = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#NewZealand
				4 = { 
					NZL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					NZL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}	
			}
		}
	}
	
	ai_rus_foreign_investment = {
		
		icon = decision
		cost = 1
		visible = { is_ai = yes }
		
		allowed = { tag = RUS }
		available = { check_variable = { treasury > 50 } AND = { is_ai = yes } }
		
		ai_will_do = { factor = 4000 }
		fixed_random_seed = no
		
		days_remove = 30 #once a month
		days_re_enable = 0
		
		complete_effect = {

			random_list = {
				######################
				######## Asia ########
				######################
				#KAZAKHSTAN	
				2 = { 
					KAZ = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 716 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					KAZ = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#INDIA
				4 = { 
					RAJ = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 440 431 471 467 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				8 = { 
					RAJ = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#MONGOLIA
				2 = { 
					MON = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					MON = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#VIETNAM
				1 = { 
					VIE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					VIE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				######################
				####### Europe #######
				######################
				#BELARUS
				4 = { 
					BLR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				8 = { 
					BLR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#UKRAINE
				2 = { 
					UKR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					UKR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#CZECH REPUBLIC
				1 = { 
					CZE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					CZE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#FINLAND
				1 = { 
					FIN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { 102 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					FIN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#GERMANY
				2 = { 
					GER = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					GER = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				######################
				##### Middle East ####
				######################
				
				#TURKEY
				2 = { 
					TUR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					TUR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = USA is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}	
			}
		}	
	}
	
	ai_nor_foreign_investment = {
		
		icon = decision
		cost = 1
		visible = { is_ai = yes }
		
		allowed = { tag = NOR }
		available = { check_variable = { treasury > 70 } AND = { is_ai = yes } }
		
		ai_will_do = { factor = 4000 }
		fixed_random_seed = no
		
		days_remove = 35 #once a month
		days_re_enable = 0
		
		complete_effect = {

			random_list = {
				######################
				###### Europe ########
				######################
				#Denmark
				4 = { 
					DEN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					DEN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Sweden
				8 = { 
					SWE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					SWE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Poland
				4 = { 
					POL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					POL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Iceland
				2 = { 
					ICE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					ICE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Finland
				3 = { 
					FIN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					FIN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#United Kingdom
				4 = { 
					ENG = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					ENG = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				######################
				### North America ####
				######################
				#United States
				6 = { 
					USA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				3 = { 
					USA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Canada
				2 = { 
					CAN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					CAN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				######################
				### South America ####
				######################
				#Chile
				4 = { 
					CHL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					CHL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Brazil
				8 = { 
					BRA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					CHL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
			}
		}
	}

	ai_ger_foreign_investment = {
		
		icon = decision
		cost = 1
		visible = { is_ai = yes }
		
		allowed = { tag = GER }
		available = { check_variable = { treasury > 70 } AND = { is_ai = yes } }
		
		ai_will_do = { factor = 4000 }
		fixed_random_seed = no
		
		days_remove = 25 #once a month
		days_re_enable = 0
		
		complete_effect = {

			random_list = {
				######################
				###### Europe ########
				######################
				#Austria
				16 = { 
					AUS = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				8 = { 
					AUS = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Denmark
				8 = { 
					DEN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					DEN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Italy
				8 = { 
					ITA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					ITA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Netherlands
				8 = { 
					HOL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					HOL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#France
				8 = { 
					FRA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					FRA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Sweden
				8 = { 
					SWE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					SWE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Poland
				8 = { 
					POL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					POL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Spain
				8 = { 
					SPR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					SPR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Switzerland
				8 = { 
					SWI = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					SWI = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Turkey
				8 = { 
					TUR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					TUR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Slovenia
				4 = { 
					SLV = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					SLV = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Iceland
				4 = { 
					ICE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					ICE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Luxembourg
				4 = { 
					LUX = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					LUX = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Finland
				4 = { 
					FIN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					FIN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Czech Republic
				4 = { 
					CZE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					CZE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Portugal
				4 = { 
					POR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					POR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#United Kingdom
				2 = { 
					ENG = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					ENG = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Belgium
				2 = { 
					BEL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					BEL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Latvia
				2 = { 
					LAT = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					LAT = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Slovakia
				2 = { 
					SLO = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					SLO = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Greece
				2 = { 
					GRE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					GRE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Norway
				2 = { 
					NOR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					NOR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Hungary
				2 = { 
					HUN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					HUN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Estonia
				2 = { 
					EST = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					EST = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Lithuania
				2 = { 
					LIT = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					LIT = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Ireland
				2 = { 
					IRE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					IRE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				######################
				### North America ####
				######################
				#United States
				4 = { 
					USA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					USA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Canada
				2 = { 
					CAN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					CAN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				######################
				### South America ####
				######################
				#Chile
				2 = { 
					CHL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					CHL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				######################
				#### Middle East #####
				######################
				#Israel
				2 = { 
					ISR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					ISR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				######################
				#######	Asia #########
				######################
				#Japan
				2 = { 
					JAP = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					JAP = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#China
				8 = { 
					CHI = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					CHI = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
			}
		}
	}

	ai_fra_foreign_investment = {
		
		icon = decision
		cost = 1
		visible = { is_ai = yes }
		
		allowed = { tag = FRA }
		available = { check_variable = { treasury > 50 } AND = { is_ai = yes } }
		
		ai_will_do = { factor = 4000 }
		fixed_random_seed = no
		
		days_remove = 30 #once a month
		days_re_enable = 0
		
		complete_effect = {

			random_list = {
				######################
				###### Europe ########
				######################
				#Belgium
				8 = { 
					BEL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					BEL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#United Kingdom
				8 = { 
					ENG = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					ENG = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Germany
				8 = { 
					GER = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					GER = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Italy
				8 = { 
					ITA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					ITA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Netherlands
				8 = { 
					HOL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					HOL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Switzerland
				8 = { 
					SWI = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					SWI = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Denmark
				8 = { 
					DEN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					DEN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Spain
				8 = { 
					SPR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				4 = { 
					SPR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Finland
				4 = { 
					FIN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					FIN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Luxembourg
				4 = { 
					LUX = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					LUX = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Portugal
				4 = { 
					POR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					POR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Slovak Republic
				4 = { 
					SLO = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					SLO = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Sweden
				4 = { 
					SWE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					SWE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Austria
				4 = { 
					AUS = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					AUS = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Poland
				4 = { 
					POL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					POL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Norway
				4 = { 
					NOR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					NOR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Iceland
				4 = { 
					ICE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					ICE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Czech Republic	
				4 = { 
					CZE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					CZE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}				
				#Estonia
				4 = { 
					EST = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					EST = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Ireland
				4 = { 
					IRE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					IRE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Latvia
				2 = { 
					LAT = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					LAT = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Lithuania
				2 = { 
					LIT = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					LIT = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Hungary
				2 = { 
					HUN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					HUN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Greece
				2 = { 
					GRE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					GRE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Slovenia
				2 = { 
					SLV = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					SLV = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				
				######################
				### North America ####
				######################
				#United States
				4 = { 
					USA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					USA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Canada
				2 = { 
					CAN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					CAN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				######################
				####### Asia #########
				######################
				#Japan
				4 = { 
					JAP = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					JAP = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#China
				4 = { 
					CHI = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					CHI = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				######################
				#### Middle East #####
				######################
				#Turkey
				2 = { 
					TUR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					TUR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Israel
				2 = { 
					ISR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					ISR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				######################
				###### Africa ########
				######################
				#Algeria
				2 = { 
					ALG = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					ALG = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Morocco
				2 = { 
					MOR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					MOR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Tunisia
				2 = { 
					TUN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					TUN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Mauritiana
				2 = { 
					MAU = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					MAU = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Mali
				2 = { 
					MAL = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					MAL = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Niger
				2 = { 
					NGR = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					NGR = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Burkina Faso
				2 = { 
					BFA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					BFA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Cote d'ivore
				2 = { 
					CDI = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					CDI = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Guinea
				2 = { 
					GUI = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					GUI = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Senegal
				2 = { 
					SEN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					SEN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Chad
				2 = { 
					CHA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					CHA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Gabon
				2 = { 
					GAB = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					GAB = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Congo
				2 = { 
					CNG = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					CNG = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
			}
		}
	}
	ai_raj_foreign_investment = {
		
		icon = decision
		cost = 1
		visible = { is_ai = yes }
		
		allowed = { tag = RAJ }
		available = { check_variable = { treasury > 60 } AND = { is_ai = yes } }
		
		ai_will_do = { factor = 4000 }
		fixed_random_seed = no
		
		days_remove = 30 #once a month
		days_re_enable = 0
		
		complete_effect = {

			random_list = {
			
				######################
				######## Asia ########
				######################
				
				### East Asia ###
				#Mongolia
				4 = {
					VIE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 597 596 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					VIE = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 597 596 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				
				
				### Southeast Asia ###
				#Indonesia
				2 = { 
					IND = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 631 633 634 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					IND = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 631 633 634 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#Singapore
					2 = { 
					SIN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 530 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				1 = { 
					SIN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 530 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#East Timor
				1 = { 
					TIM = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 734 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#BHU
				2 = { 
					BHU = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				
				#Malaysia
				4 = { 
					MAY = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 527 528 529 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					MAY = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 527 528 529 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}

				#Myanmar
				4 = { 
					BRM = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 504 505 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					BRM = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 497 504 505 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Thailand
				4 = { 
					SIA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 508 506 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } }
								invest_cic = yes
							}
						}
					}
				}
				2 = { 
					SIA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 508 506 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				### South Asia ###
				#Bangladesh
				8 = { 
					BAN = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 490 492 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				4 = { 
					BAN = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 490 492 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				4 = { 
					SRI = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 490 492 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					SRI = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 490 492 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Nepal
				5 = { 
					NEP = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 485 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				3 = { 
					NEP = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 485 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				###Central Asia###
				#Uzbekistan
				2 = { 
					UZB = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 725 726 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					UZB = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 725 726 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Turkmenistan
				2 = { 
					TRK = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 728 729 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					TRK = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 728 729 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Oman
				2 = { 
					OMA = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 182 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					OMA = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 182 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Afghanistan
				4 = { 
					AFG = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = PAK is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					AFG = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = PAK is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#United Arab Emirates
				3 = { 
					UAE = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 179 180 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				#Iran
				3 = { 
					PER = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 400 402 404 405 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					PER = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 400 402 404 405 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				###Africa Sub-Sahara###
				#Tanzania
				4 = { 
					TNZ = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 255 257 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				2 = { 
					TNZ = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 255 257 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Mozambique
				3 = { 
					MOZ = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 264 } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					MOZ = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { 264 } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
				#Zambia
				2 = { 
					ZAM = { 
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { free_building_slots = { building = industrial_complex size > 0 include_locked = no } } 
								invest_cic = yes
							} 
						} 
					} 
				}
				1 = { 
					ZAM = {
						if = { limit = { NOT = { OR = { has_opinion = { target = ROOT value < -20 } is_in_faction_with = CHI is_puppet = yes } } }
							random_owned_state = { prioritize = { } #optional
								limit = { infrastructure < 10 }
								invest_infra = yes
							}
						}
					}
				}
			}
		}	
	}
}


